#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import os

if __name__ == '__main__':
    list = [".pyc",".pyo"]
    
    for root, dirs, files in os.walk("."):
        for file in files:
            file_path = os.path.join(root, file)
            for each in list:                
                if file.endswith(each):
                    os.remove(file_path)
